c# bytes to string

31

convert system.byte a string c# -

string result = System.Text.Encoding.UTF8.GetString(byteArray);

c# bytes to string -

string result = System.Text.Encoding.UTF8.GetString(byteArray);

string from byte array c# -

var str = System.Text.Encoding.Default.GetString(result);

convert bytes to string and back c# -

string base64 = Convert.ToBase64String(bytes);
byte[] bytes = Convert.FromBase64String(base64);

Comments

Submit
0 Comments